package io.kiki.stack.netty.config;

import javax.net.ssl.KeyManagerFactory;

public class ServerOption<T> extends GenericOption<T> {

    public static final Option<Integer> TCP_SO_BACKLOG = valueOf("tcp.so.backlog", 1024);

    public static final Option<Boolean> NETTY_EPOLL_LT = valueOf("netty.epoll.lt", true);

    public static final Option<Integer> TCP_SERVER_IDLE = valueOf("tcp.server.idle.interval", 90 * 1000);

    public static final Option<Boolean> SERVER_MANAGE_channel_SWITCH = valueOf("server.manage.channel", false);

    public static final Option<Boolean> SERVER_SYNC_STOP = valueOf("server.sync.stop", false);

    public static final Option<Boolean> SRV_SSL_ENABLE = valueOf("server.ssl.enable", false);
    public static final Option<String> SRV_SSL_KEYSTORE_TYPE = valueOf("server.ssl.keystore.type", null);
    public static final Option<Boolean> SRV_SSL_NEED_CLIENT_AUTH = valueOf("server.ssl.clientAuth", false);
    public static final Option<String> SRV_SSL_KEYSTORE = valueOf("server.ssl.keystore", null);
    public static final Option<String> SRV_SSL_KEYSTORE_PASS = valueOf("server.ssl.keystore.password", null);
    public static final Option<String> SRV_SSL_KMF_ALGO = valueOf("server.ssl.kmf.algorithm", KeyManagerFactory.getDefaultAlgorithm());

    private ServerOption(String name, T defaultValue) {
        super(name, defaultValue);
    }
}
